home *** CD-ROM | disk | FTP | other *** search
- Path: gate.net!not-for-mail
- From: feathers@gate.net (Michael Feathers)
- Newsgroups: comp.lang.ada,comp.lang.c++,comp.lang.c,comp.lang.modula3,comp.lang.modula2,comp.lang.eiffel
- Subject: Re: Hungarian notation
- Followup-To: comp.lang.ada,comp.lang.c++,comp.lang.c,comp.lang.modula3,comp.lang.modula2,comp.lang.eiffel
- Date: 2 Jan 1996 14:50:58 -0500
- Organization: CyberGate, Inc.
- Message-ID: <4cc2b2$11jq@navajo.gate.net>
- References: <30C40F77.53B5@swsbbs.com> <marnoldDJEvtJ.1Lx@netcom.com> <4aleun$jlk@ns.RezoNet.NET> <marnoldDJMDBG.CFz@netcom.com> <4asnkr$7b0@solutions.solon.com> <4ath75$e7i@barnacle.iol.ie> <4b4kij$svt@news.microsoft.com> <dewar.819489496@schonberg> <4bd
- NNTP-Posting-Host: navajo.gate.net
- X-Newsreader: TIN [UNIX 1.3 950824BETA PL0]
-
- 3ga$80a@beatty.slip.netcom.com> <30DC677A.5116@zeta.org.au>
- Distribution:
-
- Ross McKay (rosko@zeta.org.au) wrote:
- : Derek Lee Beatty wrote:
- : > [snip]
- : > Doesn't one of Halmos' classic essays on notation point out the power of
- : > conventions by suggesting the silly example of using epsilon to denote the
- : > number of elements we're processing, delta as a summation index, x as the
- : > dependent variable, y as an independent variable, i as a real number, and
- : > evaluating the limit as capital N approaches zero? In other words, haven't
- : > mathematician been coding type information into variables for years,
- : > presumably because it is beneficial?
-
- I have some very good real life experience with Hungarian notation. Five
- years ago I implemented a compiler for an in-house programming language to
- be used by mathematicians and statisticians with little programming
- experience. In code reviews a few years ago, I and several other programmers
- suggested that the users of this programming language us a variant of
- Hungarian notation in order to aid their development. The response
- was uniformly negative, we only barely got them to attempt it for
- a trail period (with a little arm-twisting help from management).
-
- Two years later, these programmers have flipped completely. They
- all love Hungarian notation now. They've discovered that any convention
- is readable as long as it is consistent and logical. In addition, they've
- found it invaluable in debugging ans system maintenance.
-
- In my experience, the people who don't care for Hungarian simply haven't
- bitten the bullet long enough to get the long term payoff.
-
- : ...and now, three months later, I see the error of my ways, and choose to
- : change everything to long integer arithmetic, as there will never be a
- : fractional component to this problem.
-
- Come now, how often does -that- happen?
-
- : IMHO, what HN sets out to achieve is successful when taken only to *purpose* of
- : object, not down to the level of *type*. e.g. indexNAME_OF_OBJECT, ptrPTR_TO_OBJECT,
- : etc. are useful, but lpszPTR_TO_OBJECT goes too far, locking semantic information
- : into the name when your program statements already provide this info.
- :
- : Good OO implementations help to overcome the perceived need for "telling the
- : programmer what type operations are needed at each step" (the only reason I can
- : see for the obscene forms of HN used by M$ et al), by providing operator
- : overloading etc.
-
- Where I work, all the truly portable code is written in terms of
- typedefs. We alter the typedefs in an include file to alter data
- sizes and performance characeristic, and our variant of Hungarian
- uses these type names.
-
- These scheme has saved our butt numerous times. The same code runs
- in legacy embedded systems and under 32-bit NT with data sizes
- appropriate to the architecture.
-
-
- ===========================================================================
- "Make'em all inlines and let the compiler sort them out!" - anonymous
-
-